//go:build wireinject

package injector

import (
	"gitee.com/swsk33/server-demo/api"
	"gitee.com/swsk33/server-demo/dao"
	"gitee.com/swsk33/server-demo/service"
	"github.com/google/wire"
	"gorm.io/gorm"
)

// 用于角色服务的依赖注入器
func InitializeCharacterAPI(db *gorm.DB) *api.CharacterAPI {
	wire.Build(dao.NewCharacterDAO, service.NewCharacterService, api.NewCharacterAPI)
	return &api.CharacterAPI{}
}